package com.junit4;


import javax.annotation.Resource;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.transaction.TransactionConfiguration;
import org.springframework.transaction.annotation.Transactional;
import pers.aidenj.ostrich.service.LoginService;

@Transactional  
@TransactionConfiguration(transactionManager = "transactionManager", defaultRollback = true)  
@RunWith(SpringJUnit4ClassRunner.class)  
@ContextConfiguration(locations={"classpath*:spring-*.xml"})
public class JUnit4 {
	
	@Resource
	//PaymentService paymentService;
	LoginService loginService;
	//DruidDemoService druidDemoService;
	
	@Test
	public void test(){
	//	System.out.println(paymentService.getOrderState("0231714212069412624"));
		System.out.println(loginService.adminLogin(null,null,null,null,null,null));
		
		/*  try {  
		        FileInputStream in=new FileInputStream(new File("D:/FTPClientTest.txt"));  
		        boolean flag = FTPClientTest.uploadFile("118.89.146.69", 22, "root", "!@#$%^&*HJ", "usr", "FTPClientTest.txt", in);  
		        System.out.println(flag);  
		    } catch (FileNotFoundException e) {  
		        e.printStackTrace();  
		    }*/
		/*UserLog userLog = new UserLog();
		
		for (int i = 0; i < 1000; i++) {
			userLog.setUserId(i+1);
			userLog.setLandingTime(new Date());
			userLog.setLoginIp("127.0.0.1");
			userLog.setLoginAddress("测试"+i);
			druidDemoService.save(userLog);
		}*/
	}
}